import request from '@/utils/request';

// 获取角色列表
export function API_GET_USER_LIST(data) {
  return request({
    url: '/role/Get',
    method: 'post',
    data: data
  })
}

// 新建
export function API_USER_NEW(data) {
  return request({
    url: '/role/insert',
    method: 'post',
    data: data
  })
}


// 更新
export function API_GET_XG(data) {
  return request({
    url: '/role/update',
    method: 'post',
    data: data
  })
}


// 删除
export function API_GET_SC(data) {
  return request({
    url: '/role/delete',
    method: 'post',
    data: data
  })
}



// 操作员

// 获取操作员列表
export function API_GET_OPERATOR_LIST(data) {
  return request({
    url: '/Operator/GetV',
    method: 'post',
    data: data
  })
}

// 新建操作员
export function API_OPERATOR_NEW(data) {
  return request({
    url: '/Operator/insert',
    method: 'post',
    data: data
  })
}


// 更新操作员
export function API_OPERATOR_XG(data) {
  return request({
    url: '/Operator/update',
    method: 'post',
    data: data
  })
}


// 删除操作员
export function API_OPERATOR_SC(data) {
  return request({
    url: '/Operator/delete',
    method: 'post',
    data: data
  })
}

// 角色权限控制
export function API_OPERATOR_QKGG(data) {
  return request({
    url: '/OperModel/insert',
    method: 'post',
    data: data
  })
}

// 设置权限
export function API_OPERATOR_SZQX(data) {
  return request({
    url: '/model/SaveAccountPower',
    method: 'post',
    data: data
  })
}

// 获取菜单列表
export function API_OPERATOR_GETCD(data) {
  return request({
    url: '/Model/Get',
    method: 'post',
    data: data
  })
}

// 重置密码
export function API_OPERATOR_CZMM(data) {
  return request({
    url: '/Operator/UpdatePWInit',
    method: 'post',
    data: data
  })
}
// 修改密码
export function API_OPERATOR_XGMM(data) {
  return request({
    url: '/Operator/UpdatePWSelf',
    method: 'post',
    data: data
  })
}

// 乡镇增删改
export function API_TOW_ADD(data) {
  return request({
    url: 'township/insert',
    method: 'post',
    data: data
  })
}
export function API_TOW_DELE(data) {
  return request({
    url: '/township/delete',
    method: 'post',
    data: data
  })
}
export function API_TOW_CHGE(data) {
  return request({
    url: '/township/update',
    method: 'post',
    data: data
  })
}

// 村增删改
export function API_VILL_ADD(data) {
  return request({
    url: '/village/insert',
    method: 'post',
    data: data
  })
}
export function API_VILL_DELE(data) {
  return request({
    url: '/village/delete',
    method: 'post',
    data: data
  })
}
export function API_VILL_CHGE(data) {
  return request({
    url: '/village/update',
    method: 'post',
    data: data
  })
}


export function API_VILL_HQQX(data) {
  return request({
    url: '/OperModel/GetbyID',
    method: 'post',
    data: data
  })
}

// 获取角色权限
export function API_VILL_HQJSQX(data) {
  return request({
    url: '/role/GetbyID',
    method: 'post',
    data: data
  })
}

// 设置权限
export function API_OPERATOR_SZJSQX(data) {
  return request({
    url: '/role/SaveRolePower',
    method: 'post',
    data: data
  })
}